import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 */
public class TestDemo {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int ret = 0;
        ret = factor(n);
        System.out.println(ret);
    }

    public static int factor(int n ){
        if(n == 1){
            return 1;
        }else{
            return n*factor(n-1);
        }
    }
}
